const port = 8081

module.exports = {
  lintOnSave: false,
  devServer: {
    host: '0.0.0.0',
    public: require('os').networkInterfaces()[Object.keys(require('os').networkInterfaces())[0]][1].address + ':' + port,
    port, // 端口号
    proxy: {
      '/api': {
        target: 'http://localhost:3000',
        ws: true, // 代理websockets
        changeOrigin: true, // 是否跨域
        pathRewrite: {
          '^/api': '/' // rewrite path
        }
      }
    }
  }
}
